<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form"%>
<script type="text/javascript">
<!--
	function pledgerTrigger() {
		$(".pledgerdiv").show();
		$(".othercompanydiv").show();
		$(".nonpledgerdiv").hide();
		$(".takenote").hide();
		return true;
	}
	function nonPledgerTrigger() {
		$(".pledgerdiv").hide();
		$(".othercompanydiv").hide();
		$(".takenote").hide();
		$(".nonpledgerdiv").show();
		return true;
	}
	function companyOther() {
		if ($("#companyName").val() != 'Others') {
			$(".othercompanydiv").hide();
			return true;
		}
		$(".othercompanydiv").show();

		return true;
	}
//-->
</script>

<div class="maindivForm">
	<sf:form modelAttribute="registerObj">

		<h3>Is your organisation....</h3>
		<br />
		<div class="contentdiv">

			<div class="pinkboxmain"
				style="float: right; margin-top: -60px; height: 220px; width: 212px; padding-left: 22px; font-size: 14px; padding-right: 10px;">

				<h3>Conference Packages</h3>
				1.&nbsp;&nbsp; Full Conference<br> 2.&nbsp;&nbsp; Plenary
				Session<br> 3.&nbsp;&nbsp; Breakout Sessions<br>
				4.&nbsp;&nbsp; Post-Conference Workshop 1<br>
				5.&nbsp;&nbsp; Post-Conference Workshop 2<br> <br>
				Click <a  style="color:#c4161c;" href="information.html" target="_blank">here</a> for more information.<br>

			</div>
			<sf:radiobutton path="pledger" value="true" label="A Pledge Signer"
				onclick="javascript:pledgerTrigger();" />
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<sf:radiobutton path="pledger" value="false"
				label="A Non-Pledge Signer" onclick="javascript:nonPledgerTrigger();" />
			<div class="smallerfont">
				To check if your organisation has signed the pledge, please click <a style="color:#c4161c;"
					href="http://tafep.sg/getting_started.asp?subid=4" target="_blank">here</a>
					
			<div class="takenote">
			<h3>PLEASE NOTE:</h3>
			<p style="font-size:13px; color: #c4161c;"><strong>Breakout Sessions 2A and 2B are full.<br/><br/>
			Full Conference and Breakout Sessions Only are still available <br/>for registration.</strong></p>
			<p style="font-size:14px;">If you would like to be in the waiting list for any Breakout Sessions,<br/>please email <a style="color: #c4161c;" href="mailto:conference2013@tafep.sg">conference2013@tafep.sg</a> with the following details. </p>
			<p style="font-size:14px;">Name:<br/>
			Organisation:<br/>
			Registration ID(if any):<br/>
			Contact Number:<br/>
			</p>
			</div>
			
			</div>
			<br/>
			

			<div class="pledgerdiv">
				<label>Name of Organisation:</label>

				<sf:input path="companyName" size="50" maxlength="150"
					style="max-width: 300px;" /><br/>
				<sf:errors path="companyName" cssClass="error" />
			</div>
			<br />
			<div class="othercompanydiv">
				<label style="padding-right: 88px;">Others:</label>
				<sf:input path="companyNameOther" size="50" maxlength="150" style="max-width: 300px;"/>
				<sf:errors path="companyNameOther" cssClass="error" />
			</div>

			<br />
			<div class="nonpledgerdiv">
				<div class="pinkbox" style="width: 460px;">
					<div class="dyk">DO YOU KNOW?</div>
					<br />Organisations that have signed the <a href="http://www.tafep.sg/getting_started.asp?subid=2" target="_blank" style="color:#c4161c;">Employers' Pledge of Fair
					Employment Practices</a>  are entitled to free registration for up to 2
					employees for the Conference, Breakout Sessions and Post-Conference
					Workshops.
				</div>
				<br /> <input type="radio" name="signuppledge"
					onclick="javascript:window.open('http://tafep.sg/getting_started.asp', '_blank')"
					value="Yes">Yes, I want to pledge! <br /> <br /><input
					type="radio" name="signuppledge" value="No" />Register as Non-Pledge Signer
				<div class="snefiddiv smallerfont">
					If you are a SNEF Member, please enter your Organisation Name for special
					rates

					<sf:input path="snefId" size="53"/><sf:errors path="snefId" cssClass="error" style="padding-left:395px; font-size:14px;"/>

				</div>
			</div>
		</div>


		<br />
		<br />
		<br />
		<br />
		<br />
		<br />
		<br />
		<div class="butdiv">
			<input type="submit" name="_eventId_next" value="Next"> <input
				type="hidden" name="_flowExecutionKey" value="${flowExecutionKey}" />
		</div>

	</sf:form>
	<script type="text/javascript">
		$("#companyName").autocomplete({
			serviceUrl : "companyautocomplete.rw",
			minChars : 1,
			autoSelectFirst : true,
			deferRequestBy : 240
		});
		$("#snefId").autocomplete({
			serviceUrl : "snefautocomplete.rw",
			minChars : 2,
			autoSelectFirst : true,
			deferRequestBy : 240
		});
		<c:if test="${not registerObj.pledger}">
		$(".pledgerdiv").hide();
		$(".othercompanydiv").hide();
		</c:if>
		<c:if test="${registerObj.pledger eq null or registerObj.pledger}">
		$(".nonpledgerdiv").hide();
		</c:if>
	</script>
</div>
